<?php

class SearchController extends Controller {
    public function index(){
        import("Org.Page");
    	$this->assign('title',"我的词条");
        $m=M('Ctgl');
        $ctgl['name']= cookie('name');
        $count = $m->field(true)->where($ctgl)->count();
        $this->assign('count', $count); 
        $Page = new Page($count,10);
        $show = $Page->show();
        $list = $m->field(true)->order('id')->limit($Page->firstRow.','.$Page->listRows)->where($ctgl)->select();
        $this->assign('list', $list); 
        $this->assign('page',$show);
		$this->display();
    }
}